:TestCheatString
{
 Description: 
    Compares typed string against passed string
 Type: IF
 
 Dependencies:
  - Detect_EXE_version.txt
 
 Parameters:
   Passed:
     0@ - 1th part of cheat string
     1@ - 2nd part of cheat sting
       2@ - 3th optional part of cheat string
       3@ - 4th optional part of cheat string
      
      (0@v together)   
   Result:
     none
       Returns true or false.
 
 Example:
  06D2: 28@v = "TEST" // @v = string                                                                                                     
  0AB1: call_scm_func @TestCheatString 4 STRING 28@ 29@ 30@ 31@ 
}
{   ///////////////
0@v - cheat string to check
4@v - copied cheat string 
8@ - static adress of _cheatString
9@ - ending of merged _cheatString: _cheatString + strlen(0@v) - 1     
10@ - adress of _gtaStrlen / read character from _cheatString
11@ - adress of 4@v, increased dynamically
    \\\\\\\\\\\\\\\
}
0AB1: call_scm_func @GetAddress_cheatString 0 store_offset 8@
0A8F: 9@ = 8@ - 1 // int  ; HasKeyBeenPressed

0A8D: 9@ = read_memory 9@ size 1 virtual_protect 0

if
9@ <> false
else_jump @TestCheatString_return_false 
0A9F: 9@ = current_thread_pointer
0A8E: 11@ = 9@ + 76 // int
9@ += 60
         
0AB1: call_scm_func @GetAddress_gtaStrlen 0 store_offset 10@
0AA7: call_function 10@ num_params 1 pop 1 get_string 9@ length_to 9@

005A: 9@ += 8@  // (int)
9@ -= 1

    while 002D:   9@ >= 8@  // (int)
    0A8D: 10@ = read_memory 9@ size 1 virtual_protect 0
    0A8C: write_memory 11@ size 1 value 10@ virtual_protect 0

    9@ -= 1
    11@ += 1
    end 
    
0A8C: write_memory 11@ size 1 value 0x00 virtual_protect 0  // NULL termination        

if
08F9:   0@v == 4@v
else_jump @TestCheatString_return_false       
0A8C: write_memory 8@ size 1 value 0x00 virtual_protect false  // NULL termination     
return_true
0AB2: ret 0
    
:TestCheatString_return_false
return_false
0AB2: ret 0